/**
  高等讲堂审核
*/
<template>
  <div style="width: 100%;height: 100%;">
      <div id="myIframe" class="test-container">
          <!-- <iframe :src="'http://122.112.253.84:8080/applicationview/content/view?appid=edab014e-1ea4-4b6e-85ee-340d86f5900d&type=view&menuId=0d72bbcd-c696-4380-992b-a58fff24e0e0%231&token=' + token" frameborder="0"></iframe> -->
      </div>
    </div>
</template>
<script>
import examinationManagement from 'common/src/api/academicBehaviorNorms/examination/examinationManagement'
export default {
    components: {},
    data() {
        return {
          userInfo: {},
          token: '',
          baseUrl: process.env.BASE_API
        }
    },
    computed: {

    },
    filters: {},
    mounted() {
    },
    created() {
      // 获取当前用户auths权限
      if (localStorage.getItem("sessiondata")) {
        if (JSON.parse(localStorage.getItem("sessiondata")).mockUser) {
          this.userInfo = JSON.parse(localStorage.getItem("sessiondata")).mockUser
        } else {
          this.userInfo = JSON.parse(localStorage.getItem("sessiondata")).user
        }
      }
      examinationManagement.getPersonalToken(this.userInfo.uid).then(res => {
        if (res.code === 200) {
          this.token = res.data
          let iframeInfo = document.createElement('iframe')
          iframeInfo.setAttribute('src', this.baseUrl + '/shurui/applicationview/content/view?appid=edab014e-1ea4-4b6e-85ee-340d86f5900d&type=view&menuId=65836ea6-b7ea-40ff-b4b6-43c10eaf447f%231&token=' + this.token)
          iframeInfo.style.width = '100%'
          iframeInfo.style.height = '100%'
          iframeInfo.style.border = '0'
          let myIframe = document.getElementById('myIframe')
          myIframe.appendChild(iframeInfo)

        }
      })
    },
    methods: {},
    watch: {}
}
</script>
<style lang="scss" scoped>
.test-container {
    width: 100%;
    height: 100%;
    iframe {
        width: 100%;
        height: 100%;
    }
}
</style>
